package com.yc.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

/**
 * @author yangc91@bngrp.com
 * @date 2020/8/5 16:12
 */
@RestController
@RequestMapping("/ribbon")
public class ComputeRibbonController {
    @Autowired
    private RestTemplate restTemplate;
    @GetMapping(value = "/add"  )
    public Object getUser(@RequestParam Integer a, @RequestParam Integer b){
        String url = "http://stock-service/stock/add?a="+a+"&b="+b;
        Object result = restTemplate.getForObject(url, Object.class);
        return result;
    }
}
